package com.httpDemo.config;

import org.mybatis.spring.boot.autoconfigure.MybatisAutoConfiguration;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.context.annotation.Bean;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInterceptor;

/**
 * MyBatis的分页插件PageHelper的配置类
 * 
 * @author Administrator
 *
 */
//@Configuration // 要用的话，需打开该注解
@ConditionalOnClass(value = { PageHelper.class, MybatisAutoConfiguration.class })
public class PageHelperAutoConfiguration {

	@Bean
	public PageInterceptor pageInterceptor() {
		return new PageInterceptor();
	}
}
